#ifndef __VSFAV_SYNC_H_INCLUDED__
#define __VSFAV_SYNC_H_INCLUDED__

struct vsfav_sync_t
{
	uint32_t interval;

	// private
	struct vsflist_t streamlist;
	struct vsflist_t *pending;
	struct vsfsm_t sm;
};

struct vsfav_stream_sync_t
{
	struct vsfav_stream_t *instream;
	struct vsfav_stream_t outstream;

	// private
	struct vsflist_t list;
};

vsf_err_t vsfav_sync_init(struct vsfav_sync_t *sync, uint32_t interval);
vsf_err_t vsfav_sync_add(struct vsfav_sync_t *sync,
		struct vsfav_stream_sync_t *stream);
vsf_err_t vsfav_sync_start(struct vsfav_sync_t *sync);

#endif		// __VSFAV_SYNC_H_INCLUDED__
